package com.wyt.dao;

import com.wyt.entity.Book;
import com.wyt.entity.Book2;
import com.wyt.entity.InstOrAge;
import com.wyt.entity.OutstorAge;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OutstorAgeMapper {
    int deleteByPrimaryKey(Integer pid);

    int insert(OutstorAge record);

    int insertSelective(OutstorAge record);

    OutstorAge selectByPrimaryKey(Integer pid);

    int updateByPrimaryKeySelective(OutstorAge record);

    int updateByPrimaryKey(OutstorAge record);

    // 紧急出库 表查询
    List<Book> selectAllBook();

    //    根据pid查询
    List<Book2> selectAllinstorage_detail(Integer pid);

//    查询所有已驳回

    List<InstOrAge> selectAllInstOrAgeReject(@Param("pname") String pname, @Param("rname") String rname);

    //    查询所有已入库
    List<InstOrAge> querryAllInstOrAgeReject(@Param("pname") String pname,@Param("rname") String rname);

    //查询所有待入库
    List<InstOrAge> selectAllByStatus(@Param("pname") String pname);

    //删除单行数据
    int deleteHistory(Integer pid);

    //查询所有待入库申请

    List<InstOrAge> queryAllIns(@Param("pname") String pname,@Param("rname") String rname);
    //通过入库申请
    int passIns(@Param("rid") Integer rid,@Param("rname") String rname,@Param("pid") Integer pid);

    int updateBook(@Param("bookid") Integer bookid, @Param("count") Integer count, @Param("price") String price);
    //     驳回入库申请
    int updateTpStatusFour(@Param("rid") Integer rid,@Param("rname") String rname,@Param("pid") Integer pid,
                           @Param("desc") String desc
    );

    int insetOutstorAge(OutstorAge outstorAge);
}